<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>菜单界面</title>
    <style>
        body {
            margin: 0;
            padding: 0;
            font-family: Arial, sans-serif;
        }

        .container {
            display: flex;
            height: 100vh;
        }

        .menu {
            background-color: #333;
            color: #fff;
            padding: 20px;
            box-sizing: border-box;
        }

        .content {
            flex: 1;
            box-sizing: border-box;
            overflow: hidden; /* 隐藏滚动条 */
        }

        .menu-item {
            margin-bottom: 10px;
            cursor: pointer;
        }

        .menu-item:hover {
            background-color: #555;
        }

        iframe {
            width: 100%;
            height: 100%;
            border: none; /* 移除iframe边框 */
        }
    </style>
</head>
<body>
<div class="container">
    <div class="menu">
        <div class="menu-item" onclick="loadPage('updateUser.html')">修改用户信息</div>
        <div class="menu-item" onclick="loadPage('addQuestion.html')">添加题目</div>
        <div class="menu-item" onclick="loadPage('answerQuestion.html')">题目练习</div>
        <div class="menu-item" onclick="loadPage('answerRecord.html')">答题记录</div>
        <div class="menu-item" onclick="loadPage('examAnalysis.html')">成绩分析</div>
        <div class="menu-item" onclick="loadPage('examRecord.html')">考试记录</div>
        <div class="menu-item" onclick="loadPage('exit.html')">退出登录</div>
        <div class="menu-item" onclick="loadPage('logout.html')">注销</div>
    </div>
    <div class="content">
        <iframe id="pageFrame"></iframe>
    </div>
</div>

<script>
    function loadPage(pageUrl) {
        const iframe = document.getElementById('pageFrame');
        iframe.src = pageUrl;
    }
</script>
</body>
</html>
